#include <stdio.h>

void BubbleSort(int a[], int n)
{
    int i, j;
    for (int i = 0; i < n - 1; i++)
        for (int j = 0; j < n - 1 - i; j++)
        {
            if (a[j] > a[j + 1])
            {
                int temp = a[j];
                a[j] = a[j + 1];
                a[j + 1] = temp;
            }
        }
}
int main()
{
    int a[] = {9, 5, 6, 4, 8, 3, 0, 1, 7, 2};
    BubbleSort(a, sizeof(a) / sizeof(a[0]));
    for (int i = 0; i < sizeof(a) / sizeof(a[0]); i++)
        printf("%d ", a[i]);
    return 0;
}